home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8809 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.3 KB  |  70 lines

  1. Path: dsi.unimi.it!moreld
  2. From: moreld@dsi.unimi.it (~ZIO BUDDA~)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: BC++. Pls help me with precompiled headers...
  5. Date: 26 Feb 1996 11:46:53 GMT
  6. Organization: Computer Science Dep. - Milan University
  7. Message-ID: <4gs6jd$2ae@tic.sm.dsi.unimi.it>
  8. References: <Dn65GG.M19@twisto.eng.hou.compaq.com> <312CC5D7.29F8@wpo.borland.com>
  9. NNTP-Posting-Host: tac.fddi.dsi.unimi.it
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Jeff Jenkins (jjenkins@wpo.borland.com) wrote:
  13. > jhenell@bangate.eur.compaq.com wrote:
  14. > > 
  15. > > Using Borland C++ v4.52:
  16. > > 
  17. > > I get these (for me) rather confusing error messages.
  18. > > 
  19. > > When compiling I get the following error message:
  20. > > "Warning LEATHER.CPP 47: Cannot create pre-compiled header: code in
  21. > > header"
  22. > > (the 47th line  is the constructor of one of the classes,
  23. > > "Leather::Leather() (" )This^^^^^^^^^^^^^^^^ ctor is a non-inline method. This is, the 
  24. > definition of the function body is going to be generated each time you 
  25. > #include the header-file that contains this definition.  That's why you 
  26. > see the errors below: you have #include'd the header file in more than 
  27. > one source module, and therfore forced the compiler to generate multiple 
  28. > definitions.  The linker see's all these function definitions and starts 
  29. > to complain because it is confused as which one you want it to use.
  30.  
  31. > -- jrj
  32. >  
  33. > > This time it went through the compilation, but not the
  34. > > Building/Linking:
  35. > > Linker Error: Leather::Leather() defined in module LEATHER.CPP is
  36. > > duplicated in module RUBBER.CPP
  37. > > and this Error is repeated for all methods in the class.
  38. > > / a newbie feelin' lame & frustrated..
  39.  
  40. hi, Zio Budda Work For U :
  41. try to make this :
  42.  
  43. -------the <Ur include file/the file with the class and funtions of it-------
  44. #ifndef MYCLASS
  45. #define MYCLASS
  46.  
  47. class myclas {
  48.     private :
  49.         int a;
  50.         char c;
  51.  
  52.     public:
  53.     myclass();
  54.     ~myclass();
  55.  
  56. }
  57.  
  58. #endif
  59.  
  60. and now include the file in all file that U want ... 
  61.  
  62. bye bye and sorry for my bad english
  63. --
  64. Zio Budda "sempre alla ricerca di un account..." moreld@ghost.dsi.unimi.it
  65. http://www.dsi.unimi.it/Users/Students/moreld/home.html
  66. Ask me for questions about LINUX and Games for PC, and see my home page 
  67. I'm a programmer and a consultant...
  68.  
  69. Tel. 02/2139959 ... Chiedere di Davide Michel
  70.